Sub-heading
Some text
26 July, 2019
Some text
library(ggplot2)
## Registered S3 methods overwritten by 'ggplot2': ## method from ## [.quosures rlang ## c.quosures rlang ## print.quosures rlang
library(plotly)
## ## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2': ## ## last_plot
## The following object is masked from 'package:stats': ## ## filter
## The following object is masked from 'package:graphics': ## ## layout
## Generate data
x <- rnorm(100, mean = 50, sd = 5)
y <- rnorm(100, mean = 0, sd = 8)
plot.df <- data.frame(x = sort(x), y = sort(y))
## Create plot with ggplot2
plot1 <-
ggplot(data = plot.df, aes(x = x, y = y) ) +
geom_point(colour = "navy") +
ggtitle("Plot of x versus y") +
theme_bw()
ggplotly(plot1)